<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-添加商品分类">
</@frame.head>
<style>
	.div_show{float:left; width: 106px;height: 106px; display: inline-block; position: relative;}
	.div_show .delete{position: absolute;top: 2px; right: 0px;width: 40px; height: 40px;font-size: 25px;display:none;color:red;}
</style>
<div class="page-container">
	<form action="${contextPath}/prodtype/add_prodtype" method="post" class="form form-horizontal" id="form-prodType" enctype="multipart/form-data">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">
				商品分类上级编号：</label>
			<div class="formControls col-xs-6 col-sm-6">
				<input type="text" class="input-text" value="${parentId}" placeholder="" id="parentId" name="parentId" readonly="readonly">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">
				<span class="c-red">*</span>
				商品分类名称：</label>
			<div class="formControls col-xs-6 col-sm-6">
				<input type="text" class="input-text"  placeholder="" id="name" name="name">
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">
				商品分类描述：</label>
			<div class="formControls col-xs-6 col-sm-6">
				<input type="text" class="input-text"  placeholder="" id="description" name="description">
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">
				商品分类二级目录：</label>
			<div class="formControls col-xs-6 col-sm-6">
				<input type="text" class="input-text" value="${grade}" placeholder="" id="grade" name="grade"  readonly="readonly">
			</div>
		</div>
		
		<#if parentId==1>
		
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">
				商品分类URL：</label>
			<div class="formControls col-xs-6 col-sm-6">
				<input type="text" class="input-text" placeholder="" id="viewURL" name="viewURL">
			</div>
		</div>
				
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">
				显示状态：</label>
			<div class="formControls col-xs-6 col-sm-6">
			  <span class="select-box radius">
			   <select class="select" id="viewStatus" name="viewStatus">
	            <option value="1">显示</option>
	            <option value="0" selected="selected">隐藏</option>
               </select>
              </span>
			</div>
		</div>
 		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">移动端图标：</label>
			<div class="formControls col-xs-6 col-sm-6">
				<div class="div_show">
					<img id="mobIcon" style="width: 106px; height: 106px;"/>
					<a href="javascript:;">
	                	<div class="delete icon Hui-iconfont Hui-iconfont-del3"></div>
	                </a>
                </div>
                <br/><br/>&nbsp;建议上传尺寸106*106，png格式，单张图片大小不超过2MB
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"></label>
			<div class="formControls col-xs-6 col-sm-6">
				<input type="file" name="imageFile" id="addMobWmPic"/>
			</div>
		</div>
		</#if>
		<div class="row cl">
			<div class="col-9 col-offset-2">
				<input class="btn btn-primary radius" type="button" onclick="save();" value="保存">
			</div>
		</div>
	</form>
</div>
<@frame.end "default">
</@frame.end>
<script type="text/javascript" src="${contextPath}/resources/lib/zTree/v3/js/jquery.ztree.core-3.5.min.js"></script>
<script type="text/javascript" src="${contextPath}/resources/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script> 
<script type="text/javascript" src="${contextPath}/resources/js/prodtype/add_prodtype_tree.js"></script> 
<script type="text/javascript">
var path="${contextPath}";
</script>
</body>
</html>